package cn.itcast.order.web;

import cn.itcast.order.service.impl.TestAsyncService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description TODO
 * @author sxt
 * @date 2024/5/6 22:03
 * @version 1.0
 */
@RequestMapping("test-async")
@RestController
public class TestAsyncController {

    @Resource
    private TestAsyncService asyncService;

    @GetMapping
    public String test() {
        asyncService.testAsync1();
        asyncService.testAsync2();
        return "success";
    }
}
